//
//  JQFYHomeRecommendMusic.m
//  JQFY
//
//  Created by 代辉 on 2017/10/18.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYHomeRecommendMusic.h"
#import "JQFYMusicPlayer.h"

@implementation JQFYHomeRecommendMusic{
    NSArray *_misucs;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
        _misucs = [NSArray new];
    }
    return self;
}
- (void)getHomeRecommendMusic:(void (^)(NSArray *))sucess file:(void (^)())file
{
    [[JQFYNetworkTool sharedManager] request:RequestMethodGet
                                   urlString:@"http://app.uninhibited.cn/api/music/top"
                                  parameters:nil
                                    finished:^(id responseObject, NSError *error) {
                                        if (error) {
                                            file();
                                        } else {
                                            
                                            _misucs = [NSArray yy_modelArrayWithClass:[self class] json:responseObject];
                                            
                                            sucess(_misucs);
                                        }
                                    }];
}

@end
